<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <title>Просмотр тестов</title>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <h1>Тесты</h1>
        <table class="table">
            <thead>
                <tr>
                    <th>Имя пользователя</th>
                    <th>Тест</th>
                    <th>Дата отправки</th>
                    <th>Оценка</th>
                    <th>Действия</th>
                </tr>
            </thead>
            <tbody>
                {% for submission in submissions %}
                <tr>
                    <td>{{ submission.user.username }}</td>
                    <td>{{ submission.test.title }}</td>
                    <td>{{ submission.submitted_at }}</td>
                    <td>{{ submission.grade }}</td>
                    <td><a href="{% url 'grade_submission' submission.id %}" class="btn btn-primary">Оценить</a></td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</body>
</html>
